package com.website.custom.service.impl;

import java.util.List;
import com.website.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.website.custom.mapper.WOnlineMapper;
import com.website.custom.domain.WOnline;
import com.website.custom.service.IWOnlineService;
import com.website.common.core.text.Convert;

/**
 * 在线预约Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-12-03
 */
@Service
public class WOnlineServiceImpl implements IWOnlineService 
{
    @Autowired
    private WOnlineMapper wOnlineMapper;

    /**
     * 查询在线预约
     * 
     * @param id 在线预约主键
     * @return 在线预约
     */
    @Override
    public WOnline selectWOnlineById(Long id)
    {
        return wOnlineMapper.selectWOnlineById(id);
    }

    /**
     * 查询在线预约列表
     * 
     * @param wOnline 在线预约
     * @return 在线预约
     */
    @Override
    public List<WOnline> selectWOnlineList(WOnline wOnline)
    {
        return wOnlineMapper.selectWOnlineList(wOnline);
    }

    /**
     * 新增在线预约
     * 
     * @param wOnline 在线预约
     * @return 结果
     */
    @Override
    public int insertWOnline(WOnline wOnline)
    {
        wOnline.setCreateTime(DateUtils.getNowDate());
        return wOnlineMapper.insertWOnline(wOnline);
    }

    /**
     * 修改在线预约
     * 
     * @param wOnline 在线预约
     * @return 结果
     */
    @Override
    public int updateWOnline(WOnline wOnline)
    {
        wOnline.setUpdateTime(DateUtils.getNowDate());
        return wOnlineMapper.updateWOnline(wOnline);
    }

    /**
     * 批量删除在线预约
     * 
     * @param ids 需要删除的在线预约主键
     * @return 结果
     */
    @Override
    public int deleteWOnlineByIds(String ids)
    {
        return wOnlineMapper.deleteWOnlineByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除在线预约信息
     * 
     * @param id 在线预约主键
     * @return 结果
     */
    @Override
    public int deleteWOnlineById(Long id)
    {
        return wOnlineMapper.deleteWOnlineById(id);
    }
}
